import request from '@/utils/request/index.js'
var app = getApp();

// 用户信息 /api/v1/user/userinfo
export function apiGetMemberInfo(data) {
	return request.request({
		url: '/api/member/info',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 获取手机号  修改用户信息
export function apiMemberUpdate(data) {
	return request.request({
		url: '/api/member/update',
		method: 'Post',
		data: data,
		authType: 'None'
	})
}


//首页banner
export function apiGetOperationBanners(data) {
	return request.request({
		url: '/api/operation/banners',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}

// 获取团购列表
export function apiGetProductGroupBuy(data) {
	return request.request({
		url: '/api/product/groupBuy',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 领取新人有礼红包
export function apiOperationRedPacket(data) {
	return request.request({
		url: '/api/operation/redPacket',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 用户支付
export function apiOrderGoodsBuy(data) {
	return request.request({
		url: '/api/order/v1/goods/buy',
		method: 'Post',
		data: data,
		authType: 'None'
	})
}

// 新人商品
export function apiOperationProductNewList(data) {
	return request.request({
		url: '/api/operation/productNewList',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}

// 新人商品 历史兑换信息
export function apiOperationExchangeHistory(data) {
	return request.request({
		url: '/api/operation/productNew/exchangeHistory',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 获取商品信息
export function apiProductInfo(data) {
	return request.request({
		url: '/api/product/info',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}

// 团购商品历史兑换消息
export function apiProductInfoHistory(data) {
	return request.request({
		url: '/api/operation/productGroup/exchangeHistory',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 积分权益列表
export function apiPointSeuityList(data) {
	return request.request({
		url: '/api/product/integralBenefits',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 查询会员卡信息
export function apiOperationMemberCard(data) {
	return request.request({
		url: '/api/operation/memberCard',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 上传图片
export function GetAliyunToken(data) {
	return request.request({
		url: '/api/aliyunoss/token/mini',// /api/aliyunoss/v1/token
		method: 'GET',
		data: data,
		authType: 'None'
	})
}

// 订单信息
export function apiOrderQuery(data) {
	return request.request({
		url: '/api/order/v1/query',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}

// 抢购列表
export function apiAuctionList(data) {
	return request.request({
		url: '/api/auction/v1/list',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}

//拍品详情
export function apiAuctionDetail(data) {
	return request.request({
		url: '/api/auction/v1/detail',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}

// 参与竞拍
export function apiAuctionBid(data) {
	return request.request({
		url: '/api/auction/v1/bid',
		method: 'Post',
		data: data,
		authType: 'None'
	})
}
// 排名列表
export function apiAuctionHistory(data) {
	return request.request({
		url: '/api/auction/v1/bid/history',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}



// 预约抢购
export function apiAuctionAppointment(data) {
	return request.request({
		url: '/api/auction/v1/appointment',
		method: 'Post',
		data: data,
		authType: 'None'
	})
}


// 订单付款 会员
export function apiOrdeRunpayRepay(data) {
	return request.request({
		url: '/api/order/v1/unpay/repay',
		method: 'Post',
		data: data,
		authType: 'None'
	})
}


// 修改订单状态
export function apiOrderStatus(data) {
	return request.request({
		url: '/api/order/v1/status',
		method: 'Post',
		data: data,
		authType: 'None'
	})
}


// 核销订单详情
export function apiOrderDetail(data) {
	return request.request({
		url: '/api/order/v1/detail',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 获取门店信息
export function apiStoreInfo(data) {
	return request.request({
		url: '/api/store/info',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}

// 获取门店团购列表
export function apiStoreGroupBuy(data) {
	return request.request({
		url: '/api/store/groupBuy',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 生成小程序码
export function apiMiniProgramQrCode(data) {
	return request.request({
		url: '/api/miniProgram/qrCode',
		method: 'Post',
		data: data,
		authType: 'None'
	})
}


// 首页时间节点
export function apiAuctionHome(data) {
	return request.request({
		url: '/api/auction/v1/home',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 卡片详情
export function CardCodeDetail(data) {
	return request.request({
		url: '/api/card/info',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}

// 账户密码激活
export function cardPassCheck(data) {
	return request.request({
		url: '/api/user/v1/card/passCheck',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 确认激活
export function cardVerify(data) {
	return request.request({
		url: '/api/card/active',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 搜索商品
export function productSearch(data) {
	return request.request({
		url: '/api/product/search',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}



// 新增 修改地址
export function receiverAddressEdit(data) {
	return request.request({
		url: '/api/receiverAddress/edit',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 
export function receiverAddressList(data) {
	return request.request({
		url: '/api/receiverAddress/list',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 团队人数
export function memberTeamCount(data) {
	return request.request({
		url: '/api/member/teamCount',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}

// 团队列表
export function memberTeamList(data) {
	return request.request({
		url: '/api/member/teamList',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}


// 获取商户钱包信息
export function walletInfo(data) {
	return request.request({
		url: '/api/store/wallet/info',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}
// 获取钱包变动记录
export function walletCredits(data) {
	return request.request({
		url: '/api/wallet/credits/log',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}
// 钱包提现
export function walletWithdraw(data) {
	return request.request({
		url: '/api/wallet/withdraw',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}

// 提取到wx
export function walletWithdrawWechat(data) {
	return request.request({
		url: '/api/wallet/withdraw/to/wechat',
		method: 'POST',
		data: data,
		authType: 'None'
	})
}


// 佣金统计
export function walletCommissionStat(data) {
	return request.request({
		url: '/api/wallet/commission/stat',
		method: 'Get',
		data: data,
		authType: 'None'
	})
}






